/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aqu.persistencia.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Verito Ramirez
 *         Victor Jaramillo
 */
@Entity
@Table(name = "cxp_estadofactura")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "CxpEstadoFactura.findAll", query = "SELECT s FROM CxpEstadoFactura s"),
    @NamedQuery(name = "CxpEstadoFactura.findBycxpCodigoEstFac", query = "SELECT s FROM CxpEstadoFactura s WHERE s.cxpCodigoEstFac = :cxpCodigoEstFac"),
    @NamedQuery(name = "CxpEstadoFactura.findBycxpNombreEstFac", query = "SELECT s FROM CxpEstadoFactura s WHERE s.cxpNombreEstFac = :cxpNombreEstFac")})
public class CxpEstadoFactura implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @NotNull
    @Size(min = 1, max = 10)
    @Column(name = "CXP_CODIGO_ESTFAC")
    private String cxpCodigoEstFac;
    @Size(max = 30)
    @Column(name = "CXP_NOMBRE_ESTFAC")
    private String cxpNombreEstFac;
    
    
    public CxpEstadoFactura() {
    }

    public CxpEstadoFactura(String cxpCodigoEstFac, String cxpNombreEstFac) {
        this.cxpCodigoEstFac = cxpCodigoEstFac;
        this.cxpNombreEstFac = cxpNombreEstFac;
    }    

    public String getCxpCodigoEstFac() {
        return cxpCodigoEstFac;
    }

    public void setCxpCodigoEstFac(String cxpCodigoEstFac) {
        this.cxpCodigoEstFac = cxpCodigoEstFac;
    }

    public String getCxpNombreEstFac() {
        return cxpNombreEstFac;
    }

    public void setCxpNombreEstFac(String cxpNombreEstFac) {
        this.cxpNombreEstFac = cxpNombreEstFac;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cxpCodigoEstFac != null ? cxpCodigoEstFac.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CxpEstadoFactura)) {
            return false;
        }
        CxpEstadoFactura other = (CxpEstadoFactura) object;
        if ((this.cxpCodigoEstFac == null && other.cxpCodigoEstFac != null) || (this.cxpCodigoEstFac != null && !this.cxpCodigoEstFac.equals(other.cxpCodigoEstFac))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "clases.CxpEstadoFactura[ cxpCodigoEstFac=" + cxpCodigoEstFac + " ]";
    }
    
}
